//
//  MKVideoCollectionViewCell.m
//  ManKeCartoon
//
//  Created by dllo on 15/10/24.
//  Copyright © 2015年 ManKe. All rights reserved.
//

#import "MKVideoCollectionViewCell.h"
#import "MKBaseHeader.h"
@implementation MKVideoCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self video];
    
    }

    return self;
}


-(void)video
{
    _cover_url = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, 160*HEIGHT)];
    [self.contentView addSubview:_cover_url];
    
    _title = [[UILabel alloc]initWithFrame:CGRectMake(30*WIDTH, 30*HEIGHT, 200*WIDTH, 40*HEIGHT)];
    _title.font = [UIFont boldSystemFontOfSize:25];
    
    _title.textColor = [UIColor whiteColor];
    
    [self.cover_url addSubview:_title];
    
    
    _lastup = [[UILabel alloc]initWithFrame:CGRectMake(30*WIDTH, 60*HEIGHT, 200*WIDTH, 40*HEIGHT)];
    _lastup.font = [UIFont systemFontOfSize:18];
    
    _lastup.textColor = [UIColor whiteColor];
    
    [self.cover_url addSubview:_lastup];
    
    
    
    UIImageView *video = [[UIImageView alloc]initWithFrame:CGRectMake(330*WIDTH, 100*HEIGHT, 38*WIDTH, 38*HEIGHT)];
    video.image = [UIImage imageNamed:@"BFFF.png"];
    [self.cover_url addSubview:video];
}

-(void)model:(MKChartsModel *)model
{
    _title.text = model.title;
    
    _lastup.text = model.lastup;
    
    NSURL *url = [NSURL URLWithString:model.cover_url];
    
    [_cover_url sd_setImageWithURL:url];
}

@end
